<template>
	<view v-if="item" @click="goFindInfo" class="card bg-white u-m-t-20">
		<view class="u-flex u-p-28">
			<view>
				<u-image border-radius="14px" width="115px" height="115px" :src="item.cover">
				</u-image>
			</view>
			<view class="right u-m-l-28">
				<view class="title u-line-1 u-font-32">
					{{item.title}}
				</view>
				<view class="info">
					<u-tag class="u-m-r-8" color="#333" :text="item.sex" size="mini" bg-color="#FEF2BF" mode="dark" />
					<u-tag class="u-m-r-8" color="#333" :text="item.category" size="mini" bg-color="#FEF2BF"
						mode="dark" />
				</view>

				<view class="u-line-1 u-font-12 color-80">{{item.district}}</view>

				<!-- 寻宠显示悬赏 -->
				<view v-if="type=='pet'" class="money">
					<view v-if="item.is_personally === 1" class="money">
						<text class="u-font-18 u-m-l-10">面议</text>
					</view>
					<view v-else class="money">
						<text class="u-font-12">悬赏￥</text>
						<text class="u-font-18">{{item.reward}}</text>
					</view>
				</view>




				<!-- 寻主显示详情 -->
				<view v-if="type =='master'" class="u-line-2 color-80 u-font-12 u-m-t-8">
					{{item.detail || ''}}
				</view>
			</view>
		</view>
		<view class="u-font-12 color-80 u-p-l-20 u-p-b-24 u-flex">
			<text>{{item.create_time}}</text>
			<text class="u-m-l-66">{{item.page_view}}查看</text>
			<text class="u-m-l-60">{{item.transmit_num}}转发</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['type', 'item'],
		name: "findCard",
		methods: {
			goFindInfo() {
				uni.navigateTo({
					url: `/pagesIndex/findInfo/findInfo?type=${this.type}&id=${this.item.id}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.right {
		width: 61%;
		height: 115px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.card {
		border-radius: 6px;

		.money {
			color: #F34184;
		}
	}
</style>
